package com.eapi.project.common;

import org.springframework.http.ResponseEntity;

public class Base64SoundResponse extends BaseResponse<String> {

    public Base64SoundResponse(int code, String data, String message) {
        super(code, data, message);
    }

    public static ResponseEntity<Base64SoundResponse> buildResponse(String base64Audio) {
        return ResponseEntity.ok()
                .header("Content-Type", "application/octet-stream")
                .header("Content-Disposition", "attachment; filename=output.wav")
                .body(new Base64SoundResponse(0, base64Audio, "ok"));
    }
}
